<!--#set var="PAGE_TITLE" value="X11 Extras" -->
<!--#include virtual="/salma-hayek/header.html" -->

<h1>X11 Extras</h1>

<p>All the programs on this page are free and available for download in
source form. There are no binaries available even if you're very pretty
and ask very nicely. Well, maybe if you're <i>very</i> pretty, but
I'll be expecting proof, and the judge's decision is final.

<p>The programs are all fairly minimalist, but that's the way I like
them.

<p>If you try any of these programs, please mail me to let me know how
you get on - whatever you think of them. I'm particularly interested in
generalisations or simplifications that further the programs' minimalist
nature.

<h2>lock - X Display Locker</h2>

<p><tt>lock</tt> is a simple display locker so that you can
safely leave your X terminal unattended. It doesn't blank the
screen (the X server can do that - see <tt>xset(1)</tt>) and it
doesn't have any pretty graphics. You're supposed to be leaving
your terminal unattended, remember? Buy yourself a telly if you
want something to watch.

<p>Running <tt>lock</tt> locks all the screens on the display.
To unlock the display, type your password and press Return.

<p>While the display is locked the screen is covered by a blank
window and the mouse cursor is hidden.  A one-line message is
displayed (by default this is "This X display is locked. Please
supply the password.").

<p>As you type each successive character of your password, an
asterisk is shown. The Backspace key deletes the last character
typed and the Esc key starts again.

<p>You can change both the one-line message and the font used
to display it using X resources. The message is resource
<tt>message</tt> while the font is, unsurprisingly,
<tt>font</tt>. You can also change the system-wide defaults by
editing <tt>lock.h</tt> and recompiling.

<p>On Linux systems, <tt>lock</tt> disables virtual consoles
while running. 

<h2>x11-reaper - Simple X Session Manager</h2>

<p>Syntax: <tt>x11-reaper [daemon]</tt></p>

<p><tt>x11-reaper</tt> is an imitation of two programs that are
part of Silicon Graphics' IRIX operating system,
<tt>reaper(1)</tt> and <tt>endsession(1)</tt>.

<p>The idea is to run <tt>x11-reaper</tt> as the last program
in your Xinitrc or .xsession, making it the program upon which
the session hangs.  It places a property on the root window,
and waits for it to be altered.  When the property is altered,
the daemon <i>x11-reaper</i> terminates, causing the X11 login
session to end.

<p>If run without an argument, <tt>x11-reaper</tt> behaves as
<tt>endsession(1)</tt>, ending the login session. If run with
an argument (say "daemon") then it behaves as
<tt>reaper(1)</tt>, waiting for the session to end.

<p>In your .xsession (if you're a user installing this just for
yourself) or your Xinitrc (if you're an administrator
installing this for all users) ensure that the last line is
something like <tt>x11-reaper daemon</tt>.  When you want to
log out, run <tt>x11-reaper</tt> (from the command line or from
an on-screen menu or whatever). That's all there is to it!

<p>[If you find these instructions too terse, then you probably
shouldn't be trying to follow them. It's advisable to know what
you're doing, or you may prevent yourself from being able to
use your X server.]

<h2>window - X Window Controller</h2>

<p><tt>window</tt> lets you read and write some of the attributes of
X windows.

<p><tt>wselect</tt> shows a cursor and allows you to select a window.

<p>The documentation gives examples of how to use these tools to
do cool stuff under X without having to do any X programming yourself.

<h2>speckeysd - Special Keys Daemon</h2>

<p><tt>speckeysd</tt> is an imitation of Sun's Solaris program of
the same name. It lets you attach commands to hot-key combinations.

<p>It's possible, for example, in combination with a program
like <tt>window</tt>, to add Alt-Tab or Alt-F4 style functionality
to a window manager that doesn't support hot keys. (<tt>lwm</tt>
being an example that springs to mind.)

<p>I only wrote this program to show that it could be done; I don't
use it myself. Because of this, the language for binding commands
to keys is rather primitive, but I'd be prepared to polish it up if there
were any demand for it.

<p>Thanks to Tuncer Ayaz, Adam Sampson, and Anselm R. Garbe for their improvements.

<h2>menu - X Menu</h2>

<p><tt>menu</tt> displays a menu at the top of the screen, based
on a specification in a <tt>.menu</tt> file which associates labels
with commands to be executed. There's also a clock at the very
right-hand edge of the menu bar. I started to use <tt>menu</tt>
when a new server arrived at work, and I could no longer fit
everything I needed on the three buttons offered by my earlier
<tt>clock</tt> program.

<p>This program is a bit rough around the edges, and has the
misfortune of working well enough that I have little inclination
to polish it. If you want to see improvement, you should prod me.
Those who don't live in prodding distance could consider sending
me mail.

<h2>clock - A Novel Clock</h2>

<p>You might not notice that <tt>clock</tt> is running. It
opens a tiny window (4 square pixels) in the top right of the
screen and waits for the pointer to enter it. When the pointer
does enter, the window expands to display the current date and
time.

<p>You can set what the "clock" actually displays using the
<tt>viewCommand</tt> resource. This is a program to be
executed, whose output will be displayed as the "time".
You can thus call a shell-script which gives both the time
and "new mail" notification, say.

<p>For left-handed users, there is the <tt>leftHanded</tt>
resource. Giving this a value will cause clock to open its
window in the top <i>left</i> corner of the screen.

<p>You can also set the action of the three mouse buttons using
X resources. I have xkill on button 2 and lock on button 3. So
to lock the screen, I throw the mouse and hit button 3. To kill
a wayward program I throw the mouse, hit button 2, find the
window that's to die and kaboom!

<h2>Download</h2>

<p>The source distribution is here (<a href="x11-extras.tar.gz">x11-extras.tar.gz</a>).

<p>The <a href="ChangeLog.html">x11-extras ChangeLog</a> is available separately.

<!--#include virtual="/salma-hayek/footer.html" -->
